using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Win32;

namespace Bosphorus.Integration.Jira.Thor.Client.PlugIn.Common.Configuration
{
    public static class ConfigurationManager
    {
        private static string webServiceUrl;

        static ConfigurationManager()
        {
            RegistryKey registryKey = Registry.ClassesRoot.OpenSubKey("Bosphorus.Integration.Jira.Thor.Client.PlugIn\\WebServiceUrl");
            if(registryKey == null)
            {
                string message = "Connection string can not found";
                throw new Exception(message);
            }

            webServiceUrl = registryKey.GetValue("").ToString();
        }

        public static string WebServiceUrl
        {
            get { return webServiceUrl; }
        }
    }
}